package co.fitstart.entity.courseware.assessment;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import co.fitstart.entity.course.round.CourseRound;

/**
 * 学员作息/饮食习惯
 * @author haiyan_xiao
 *
 */
@Entity
@Table(name = "student_habit")
@JsonIgnoreProperties(value={"hibernate_lazy_initializer","handler","fieldHandler"})
public class StudentHabit {
    @Id
    @GeneratedValue
    private Long id;
    
    /** 所属课次 */
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private CourseRound courseRound;
    
    /** 早起时间 */
    private String getUpTime;
    
    /** 入睡时间 */
    private String sleepTime;
    
    /** 应酬频率 */
    private String entertainmentFrequency;
    
    /** 早-摄入时间 */
    private String breakfastTime;
    
    /** 早-摄入食物类型及比例 */
    private String breakfastType;
    
    /** 早-摄入量 */
    private String breakfastIntake;
    
    /** 中-摄入时间 */
    private String lunchTime;
    
    /** 中-摄入食物类型及比例 */
    private String lunchType;
    
    /** 中-摄入量 */
    private String lunchIntake;
    
    /** 晚-摄入时间 */
    private String dinnerTime;
    
    /** 晚-摄入食物类型及比例 */
    private String dinnerType;
    
    /** 晚-摄入量 */
    private String dinnerIntake;
    
    /** 其他-摄入时间 */
    private String snackTime;
    
    /** 其他-摄入食物类型及比例 */
    private String snackType;
    
    /** 其他-摄入量 */
    private String snackIntake;
    
    /** 饮水量 */
    private String waterIntake;
    
    /** 其他 */
    private String remark;
    
    private Date createTime;
    
    @Column(name = "is_disabled")
    private boolean disabled;
    
    public StudentHabit() {
        
    }
    
    public StudentHabit(CourseRound courseRound) {
        this.courseRound = courseRound;
        this.createTime = new Date();
    }
    
    /**
     * initialize
     * @param courseRound
     * @return
     */
    public StudentHabit initialize(CourseRound courseRound) {
        this.courseRound = courseRound;
        this.createTime = new Date();
        this.disabled = false;
        
        return this;
    }
    
    /**
     * edit
     * @param studentHabit
     * @return
     */
    public StudentHabit edit(StudentHabit studentHabit) {
        this.getUpTime = studentHabit.getGetUpTime();
        this.sleepTime = studentHabit.getSleepTime();
        this.entertainmentFrequency = studentHabit.getEntertainmentFrequency();
        this.breakfastTime = studentHabit.getBreakfastTime();
        this.breakfastType = studentHabit.getBreakfastType();
        this.breakfastIntake = studentHabit.getBreakfastIntake();
        this.lunchTime = studentHabit.getLunchTime();
        this.lunchType = studentHabit.getLunchType();
        this.lunchIntake = studentHabit.getLunchIntake();
        this.dinnerTime = studentHabit.getDinnerTime();
        this.dinnerType = studentHabit.getDinnerType();
        this.dinnerIntake = studentHabit.getDinnerIntake();
        this.snackTime = studentHabit.getSnackTime();
        this.snackType = studentHabit.getSnackType();
        this.snackIntake = studentHabit.getSnackIntake();
        this.waterIntake = studentHabit.getWaterIntake();
        this.remark = studentHabit.getRemark();
        
        return this;
    }
    
    /**
     * edit getUpTime
     * @param getUpTime
     * @return
     */
    public StudentHabit editGetUpTime(String getUpTime) {
        this.getUpTime = getUpTime;
        
        return this;
    }
    
    /**
     * edit sleepTime
     * @param sleepTime
     * @return
     */
    public StudentHabit editSleepTime(String sleepTime) {
        this.sleepTime = sleepTime;
        
        return this;
    }
    
    /**
     * edit entertainmentFrequency
     * @param entertainmentFrequency
     * @return
     */
    public StudentHabit editEntertainmentFrequency(String entertainmentFrequency) {
        this.entertainmentFrequency = entertainmentFrequency;
        
        return this;
    }
    
    /**
     * edit breakfastTime
     * @param breakfastTime
     * @return
     */
    public StudentHabit editBreakfastTime(String breakfastTime) {
        this.breakfastTime = breakfastTime;
        
        return this;
    }
    
    /**
     * edit breakfastType
     * @param breakfastType
     * @return
     */
    public StudentHabit editBreakfastType(String breakfastType) {
        this.breakfastType = breakfastType;
        
        return this;
    }
    
    /**
     * edit breakfastIntake
     * @param breakfastIntake
     * @return
     */
    public StudentHabit editBreakfastIntake(String breakfastIntake) {
        this.breakfastIntake = breakfastIntake;
        
        return this;
    }
    
    /**
     * edit lunchTime
     * @param lunchTime
     * @return
     */
    public StudentHabit editLunchTime(String lunchTime) {
        this.lunchTime = lunchTime;
        
        return this;
    }
    
    /**
     * edit lunchType
     * @param lunchType
     * @return
     */
    public StudentHabit editLunchType(String lunchType) {
        this.lunchType = lunchType;
        
        return this;
    }
    
    /**
     * edit lunchIntake
     * @param lunchIntake
     * @return
     */
    public StudentHabit editLunchIntake(String lunchIntake) {
        this.lunchIntake = lunchIntake;
        
        return this;
    }
    
    /**
     * edit dinnerTime
     * @param dinnerTime
     * @return
     */
    public StudentHabit editDinnerTime(String dinnerTime) {
        this.dinnerTime = dinnerTime;
        
        return this;
    }
    
    /**
     * edit dinnerType
     * @param dinnerType
     * @return
     */
    public StudentHabit editDinnerType(String dinnerType) {
        this.dinnerType = dinnerType;
        
        return this;
    }
    
    /**
     * edit dinnerIntake
     * @param dinnerIntake
     * @return
     */
    public StudentHabit editDinnerIntake(String dinnerIntake) {
        this.dinnerIntake = dinnerIntake;
        
        return this;
    }
    
    /**
     * edit snackTime
     * @param snackTime
     * @return
     */
    public StudentHabit editSnackTime(String snackTime) {
        this.snackTime = snackTime;
        
        return this;
    }
    
    /**
     * edit snackType
     * @param snackType
     * @return
     */
    public StudentHabit editSnackType(String snackType) {
        this.snackType = snackType;
        
        return this;
    }
    
    /**
     * edit snackIntake
     * @param snackIntake
     * @return
     */
    public StudentHabit editSnackIntake(String snackIntake) {
        this.snackIntake = snackIntake;
        
        return this;
    }
    
    /**
     * edit waterIntake
     * @param waterIntake
     * @return
     */
    public StudentHabit editWaterIntake(String waterIntake) {
        this.waterIntake = waterIntake;
        
        return this;
    }
    
    /**
     * edit remark
     * @param remark
     * @return
     */
    public StudentHabit editRemark(String remark) {
        this.remark = remark;
        
        return this;
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the courseRound
     */
    public CourseRound getCourseRound() {
        return courseRound;
    }

    /**
     * @return the getUpTime
     */
    public String getGetUpTime() {
        return getUpTime;
    }

    /**
     * @return the sleepTime
     */
    public String getSleepTime() {
        return sleepTime;
    }

    /**
     * @return the entertainmentFrequency
     */
    public String getEntertainmentFrequency() {
        return entertainmentFrequency;
    }

    /**
     * @return the breakfastTime
     */
    public String getBreakfastTime() {
        return breakfastTime;
    }

    /**
     * @return the breakfastType
     */
    public String getBreakfastType() {
        return breakfastType;
    }

    /**
     * @return the breakfastIntake
     */
    public String getBreakfastIntake() {
        return breakfastIntake;
    }

    /**
     * @return the lunchTime
     */
    public String getLunchTime() {
        return lunchTime;
    }

    /**
     * @return the lunchType
     */
    public String getLunchType() {
        return lunchType;
    }

    /**
     * @return the lunchIntake
     */
    public String getLunchIntake() {
        return lunchIntake;
    }

    /**
     * @return the dinnerTime
     */
    public String getDinnerTime() {
        return dinnerTime;
    }

    /**
     * @return the dinnerType
     */
    public String getDinnerType() {
        return dinnerType;
    }

    /**
     * @return the dinnerIntake
     */
    public String getDinnerIntake() {
        return dinnerIntake;
    }

    /**
     * @return the snackTime
     */
    public String getSnackTime() {
        return snackTime;
    }

    /**
     * @return the snackType
     */
    public String getSnackType() {
        return snackType;
    }

    /**
     * @return the snackIntake
     */
    public String getSnackIntake() {
        return snackIntake;
    }

    /**
     * @return the waterIntake
     */
    public String getWaterIntake() {
        return waterIntake;
    }

    /**
     * @return the remark
     */
    public String getRemark() {
        return remark;
    }

    /**
     * @return the createTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @return the disabled
     */
    public boolean isDisabled() {
        return disabled;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param courseRound the courseRound to set
     */
    public void setCourseRound(CourseRound courseRound) {
        this.courseRound = courseRound;
    }

    /**
     * @param getUpTime the getUpTime to set
     */
    public void setGetUpTime(String getUpTime) {
        this.getUpTime = getUpTime;
    }

    /**
     * @param sleepTime the sleepTime to set
     */
    public void setSleepTime(String sleepTime) {
        this.sleepTime = sleepTime;
    }

    /**
     * @param entertainmentFrequency the entertainmentFrequency to set
     */
    public void setEntertainmentFrequency(String entertainmentFrequency) {
        this.entertainmentFrequency = entertainmentFrequency;
    }

    /**
     * @param breakfastTime the breakfastTime to set
     */
    public void setBreakfastTime(String breakfastTime) {
        this.breakfastTime = breakfastTime;
    }

    /**
     * @param breakfastType the breakfastType to set
     */
    public void setBreakfastType(String breakfastType) {
        this.breakfastType = breakfastType;
    }

    /**
     * @param breakfastIntake the breakfastIntake to set
     */
    public void setBreakfastIntake(String breakfastIntake) {
        this.breakfastIntake = breakfastIntake;
    }

    /**
     * @param lunchTime the lunchTime to set
     */
    public void setLunchTime(String lunchTime) {
        this.lunchTime = lunchTime;
    }

    /**
     * @param lunchType the lunchType to set
     */
    public void setLunchType(String lunchType) {
        this.lunchType = lunchType;
    }

    /**
     * @param lunchIntake the lunchIntake to set
     */
    public void setLunchIntake(String lunchIntake) {
        this.lunchIntake = lunchIntake;
    }

    /**
     * @param dinnerTime the dinnerTime to set
     */
    public void setDinnerTime(String dinnerTime) {
        this.dinnerTime = dinnerTime;
    }

    /**
     * @param dinnerType the dinnerType to set
     */
    public void setDinnerType(String dinnerType) {
        this.dinnerType = dinnerType;
    }

    /**
     * @param dinnerIntake the dinnerIntake to set
     */
    public void setDinnerIntake(String dinnerIntake) {
        this.dinnerIntake = dinnerIntake;
    }

    /**
     * @param snackTime the snackTime to set
     */
    public void setSnackTime(String snackTime) {
        this.snackTime = snackTime;
    }

    /**
     * @param snackType the snackType to set
     */
    public void setSnackType(String snackType) {
        this.snackType = snackType;
    }

    /**
     * @param snackIntake the snackIntake to set
     */
    public void setSnackIntake(String snackIntake) {
        this.snackIntake = snackIntake;
    }

    /**
     * @param waterIntake the waterIntake to set
     */
    public void setWaterIntake(String waterIntake) {
        this.waterIntake = waterIntake;
    }

    /**
     * @param remark the remark to set
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }

    /**
     * @param createTime the createTime to set
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * @param disabled the disabled to set
     */
    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }
}
